<!DOCTYPE html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="contextPath" value="${pageContext.request.contextPath}" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>添加用户</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<meta content="width=device-width, initial-scale=1" name="viewport">
<link rel="stylesheet" type="text/css" href="${contextPath}/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="${contextPath}/css/bootstrap-theme.min.css" />
<link href="${contextPath}/css/jquery-ui.min.css" rel="stylesheet">
<link href="${contextPath}/css/jquery-ui.theme.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="${contextPath}/css/public.css">
<script type="text/javascript" src="${contextPath}/js/jquery.min.js"></script>
<script type="text/javascript" src="${contextPath}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${contextPath}/js/common.js"></script>
<script type="text/javascript" src="${contextPath}/js/jquery.ui.core.js"></script>
<script type="text/javascript" src="${contextPath}/js/jquery.ui.widget.js"></script>
<script type="text/javascript" src="${contextPath}/js/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="${contextPath}/js/jquery.ui.datepicker-ch.js"></script>
<body>
	<div class="container">


		<div class="panel panel-default">
			<div class="panel-heading">
				添加
				<span id="taskMarkTimeMonthTotle" class="pull-right text-success">
					管理员：${sessionScope.username} |
					<a href="${contextPath}/quit">退出</a>
				</span>
			</div>
			<div class="panel-body">
				<c:if test="${message != null}">
					<div class="alert alert-danger alert-dismissable">
						<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
						${message}
					</div>
				</c:if>
				<form action="${contextPath}/security/addCustomer" method="post" id="addCustomer" name="addCustomer" role="form" class="form-horizontal">
					<div class="form-group">
						<!-- 客户名称 -->
						<label for="marriageId" class="col-sm-2 control-label">客户名称：</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" name="name" id="name" placeholder="客户名称" autocomplete="off">
							<span class="help-block"></span>
						</div>
						<!-- 会员号 -->
						<label for="marriageId" class="col-sm-2 control-label">会员号：</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" name="card" id="card" placeholder="会员号" autocomplete="off">
							<span class="help-block"></span>
						</div>
						<!-- 地址 -->
						<label for="address" class="col-sm-2 control-label">送(发)货地址：</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" name="address" id="address" placeholder="送(发)货地址" autocomplete="off">
							<span class="help-block"></span>
						</div>
						<!-- 货站信息 -->
						<label for="freightStation" class="col-sm-2 control-label">货站信息：</label>
						<div class="col-sm-10">
							<input class="form-control" id="freightStation" name="freightStation" type="text" placeholder="货站信息" autocomplete="off">
							<span class="help-block"></span>
						</div>
						<!-- 订单时间 -->
						<label for="salesTime" class="col-sm-2 control-label">订单时间：</label>
						<div class="col-sm-10">
							<input class="form-control" id="salesTime" name="salesTime" type="text" placeholder="订单时间" autocomplete="off">
							<span class="help-block"></span>
						</div>
						<!-- 货款状态 -->
						<label for=paymentStatus class="col-sm-2 control-label">货款状态：</label>
						<div class="col-sm-10">
							<select class="form-control" id="paymentStatus" name="paymentStatus">
								<option value="欠款" selected="selected">欠款</option>
								<option value="付款">付款</option>
							</select>
							<span class="help-block"></span>
						</div>
						<!-- 已付金额 -->
						<label for="paid" class="col-sm-2 control-label">已付金额：</label>
						<div class="col-sm-10">
							<input class="form-control" id="paid" name="paid" type="text" placeholder="已付金额" autocomplete="off">
							<span class="help-block"></span>
						</div>
					</div>
					<hr>
					<div id="ps">
						<div class="form-group" id="h0">
							<legend>表单项</legend>
							<!-- 产品名称 -->
							<label for="product" class="col-sm-2 control-label">产品名称：</label>
							<div class="col-sm-10">
								<input class="form-control" name="product" type="text" placeholder="产品名称" autocomplete="off">
								<span class="help-block"></span>
							</div>
							<!-- 规格型号 -->
							<label for="specification" class="col-sm-2 control-label">规格型号：</label>
							<div class="col-sm-10">
								<input class="form-control" name="specification" type="text" placeholder="规格型号" autocomplete="off">
								<span class="help-block"></span>
							</div>
							<!-- 材质 -->
							<label for="texture" class="col-sm-2 control-label">材质：</label>
							<div class="col-sm-10">
								<input class="form-control" name="texture" type="text" placeholder="材质" autocomplete="off">
								<span class="help-block"></span>
							</div>
							<!-- 颜色 -->
							<label for="color" class="col-sm-2 control-label">颜色：</label>
							<div class="col-sm-10">
								<input class="form-control" name="color" type="text" placeholder="颜色" autocomplete="off">
								<span class="help-block"></span>
							</div>
							<!-- 数量 -->
							<label for="number" class="col-sm-2 control-label">数量：</label>
							<div class="col-sm-10">
								<input class="form-control" name="number" type="text" placeholder="数量" autocomplete="off">
								<span class="help-block"></span>
							</div>
							<!-- 单价 -->
							<label for="unit" class="col-sm-2 control-label">单价：</label>
							<div class="col-sm-10">
								<input class="form-control" name="unit" type="text" placeholder="单价" autocomplete="off">
								<span class="help-block"></span>
							</div>
							<!-- 金额 -->
							<label for="amout" class="col-sm-2 control-label">金额：</label>
							<div class="col-sm-10">
								<input class="form-control" name="amout" type="text" placeholder="金额" autocomplete="off">
								<span class="help-block"></span>
							</div>
							<!-- 备注 -->
							<label for="remark" class="col-sm-2 control-label">备注：</label>
							<div class="col-sm-10">
								<textarea rows="2" cols="" class="form-control" id="remark" name="remark" placeholder="备注" autocomplete="off"></textarea>
								<span class="help-block"></span>
							</div>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-offset-10 col-sm-10">
							<button class="btn btn-success" id="addProduct" name="addProduct" type="button">点击添加更多产品</button>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
							<button type="button" class="btn btn-success" id="add">添加</button>
							<button type="button" class="btn btn-primary" id="close">关闭</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#salesTime").datepicker();
			$.datepicker.regional["ch"];
			var now = new Date();
			var tt = now.getFullYear() + "-" + ((now.getMonth() + 1) < 10 ? "0" : "") + (now.getMonth() + 1) + "-" + (now.getDate() < 10 ? "0" : "") + now.getDate();
			$("#salesTime").val(tt);
			$("#add").click(function() {
				addCustomer.submit();
			});
			$("#close").click(function() {
				window.close();
			});
			$("#addProduct").click(function() {
				$("#ps").append($("#h0").clone());

			})
		});
	</script>
</body>
</html>

